package com.itheima.stock.controller;

import com.itheima.stock.api.StockTaskAPI;
import com.itheima.stock.response.ResponseResult;
import com.itheima.stock.service.StockTimerService;
import org.springframework.web.bind.annotation.RestController;

/**
 * @version 1.0
 * @Author lwx
 * @Date 2024/12/29 21:09
 */
@RestController
public class StockTaskController implements StockTaskAPI {

    private final StockTimerService stockTimerService;

    public StockTaskController(StockTimerService stockTimerService) {
        this.stockTimerService = stockTimerService;
    }

    @Override
    public ResponseResult<?> getStockInfo() {
        stockTimerService.getStockInfo();
        return ResponseResult.ok();
    }

    @Override
    public ResponseResult<?> getStockBlockInfo() {
        stockTimerService.getStockBlockInfo();
        return ResponseResult.ok();
    }

    @Override
    public ResponseResult<?> getInnerMarketInfo() {
        stockTimerService.getInnerMarketInfo();
        return ResponseResult.ok();
    }
}
